﻿#region itdc

/************************************************************************
*Copyright(C) 2015 by qsgy
 *All rights reserved. 
 *FileName:     $safeitemname$
 *Author:       oyh
 *Version:      
 *UnityVersion：
 *Date:   $time$      
 *Description:    
 *History: 
************************************************************************/
#endregion
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RunNext :NextRunner {
    [Tooltip("结束时激活的物体")]
    public GameObject[] nextActive;
    [Tooltip("结束时激活的脚本")]
    public NextRunner[] nextEnable;
    private void OnDestroy()
    {
        foreach (var i in nextActive)
        {
            if (i != null) i.SetActive(true);

        }
        foreach (var i in nextEnable)
        {
            if (i != null)
            {
                i.enabled = true;
                
            }
        }
    }

    private void OnDisable()
    {
        OnDestroy();
    }
}
